package com.heima.mapper;

import com.github.pagehelper.Page;
import com.heima.pojo.Sku;
import com.heima.pojo.dto.SkuPageDTO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface SkuMapper {


    Page<Sku> pageQuery(SkuPageDTO skuPageDTO);

    @Insert("insert into tb_sku (sku_id,sku_name,sku_image,price,class_id,is_discount,unit,brand_Name,create_time,update_time) " +
            "values (#{skuId},#{skuName},#{skuImage},#{price},#{classId},#{isDiscount},#{unit},#{brandName},#{createTime},#{updateTime})")
    void insert(Sku sku);

    void update(Sku sku);
}
